package com.bjgzy.rating.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.luck.picture.lib.entity.LocalMedia;

/**
 * @author xubo
 * @date 2018/8/31 12:55
 */
public class SignUp3Data implements Parcelable {
    boolean show;
    boolean uploadComplete;
    boolean uploading;
    LocalMedia mLocalMedia;
    String url;
    int position;
    long uploadId;

    @Override
    public String toString() {
        return "SignUp3Data{" +
                "show=" + show +
                ", uploadComplete=" + uploadComplete +
                ", uploading=" + uploading +
                ", mLocalMedia=" + mLocalMedia +
                ", url='" + url + '\'' +
                ", position=" + position +
                ", uploadId=" + uploadId +
                '}';
    }

    public long getUploadId() {
        return uploadId;
    }

    public void setUploadId(long uploadId) {
        this.uploadId = uploadId;
    }

    public boolean isShow() {
        return show;
    }

    public SignUp3Data setShow(boolean show) {
        this.show = show;
        return this;
    }

    public boolean isUploadComplete() {
        return uploadComplete;
    }

    public void setUploadComplete(boolean uploadComplete) {
        this.uploadComplete = uploadComplete;
    }

    public boolean isUploading() {
        return uploading;
    }

    public void setUploading(boolean uploading) {
        this.uploading = uploading;
    }

    public LocalMedia getLocalMedia() {
        return mLocalMedia;
    }

    public SignUp3Data setLocalMedia(LocalMedia localMedia) {
        mLocalMedia = localMedia;
        return this;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public SignUp3Data() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte(this.show ? (byte) 1 : (byte) 0);
        dest.writeByte(this.uploadComplete ? (byte) 1 : (byte) 0);
        dest.writeByte(this.uploading ? (byte) 1 : (byte) 0);
        dest.writeParcelable(this.mLocalMedia, flags);
        dest.writeString(this.url);
        dest.writeInt(this.position);
        dest.writeLong(this.uploadId);
    }

    protected SignUp3Data(Parcel in) {
        this.show = in.readByte() != 0;
        this.uploadComplete = in.readByte() != 0;
        this.uploading = in.readByte() != 0;
        this.mLocalMedia = in.readParcelable(LocalMedia.class.getClassLoader());
        this.url = in.readString();
        this.position = in.readInt();
        this.uploadId = in.readLong();
    }

    public static final Creator<SignUp3Data> CREATOR = new Creator<SignUp3Data>() {
        @Override
        public SignUp3Data createFromParcel(Parcel source) {
            return new SignUp3Data(source);
        }

        @Override
        public SignUp3Data[] newArray(int size) {
            return new SignUp3Data[size];
        }
    };
}
